package phapp.model.system;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: ts_menu_info 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类 Copyright:
 * Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Menu extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;

   // columns START
   /** funcId */
   private java.lang.Integer funcId;
   /** funcPid */
   private java.lang.Integer funcPid;
   /** funcName */
   private java.lang.String funcName;
   private java.lang.String funcPName;
   /** funcUrl */
   private java.lang.String funcUrl;
   /** sortSeq */
   private java.lang.Integer sortSeq;
   /** funcDesc */
   private java.lang.String funcDesc;
   /** funcStatus */
   private java.lang.Integer funcStatus;
   /** createDate */
   private java.sql.Timestamp createDate;
   /** updateDate */
   private java.sql.Timestamp updateDate;

   private java.util.ArrayList idList;

   // columns END

   public Menu()
   {
   }

   public java.lang.String getFuncPName()
   {
      return funcPName;
   }

   public void setFuncPName(java.lang.String funcPName)
   {
      this.funcPName = funcPName;
   }

   public Menu(java.lang.Integer funcId)
   {
      this.funcId = funcId;
   }

   public void setId(java.lang.Integer value)
   {
      this.funcId = value;
   }

   public java.lang.Integer getId()
   {
      return this.funcId;
   }
   
   public void setFuncId(java.lang.Integer value)
   {
      this.funcId = value;
   }

   public java.lang.Integer getFuncId()
   {
      return this.funcId;
   }

   public void setFuncPid(java.lang.Integer value)
   {
      this.funcPid = value;
   }

   public java.lang.Integer getFuncPid()
   {
      return this.funcPid;
   }

   public void setFuncName(java.lang.String value)
   {
      this.funcName = value;
   }

   public java.lang.String getFuncName()
   {
      return this.funcName;
   }

   public void setFuncUrl(java.lang.String value)
   {
      this.funcUrl = value;
   }

   public java.lang.String getFuncUrl()
   {
      return this.funcUrl;
   }

   public void setSortSeq(java.lang.Integer value)
   {
      this.sortSeq = value;
   }

   public java.lang.Integer getSortSeq()
   {
      return this.sortSeq;
   }

   public void setFuncDesc(java.lang.String value)
   {
      this.funcDesc = value;
   }

   public java.lang.String getFuncDesc()
   {
      return this.funcDesc;
   }

   public void setFuncStatus(java.lang.Integer value)
   {
      this.funcStatus = value;
   }

   public java.lang.Integer getFuncStatus()
   {
      return this.funcStatus;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public String getUpdateDateString()
   {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }

   public void setUpdateDateString(String value)
   {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE, java.sql.Timestamp.class));
   }

   public void setUpdateDate(java.sql.Timestamp value)
   {
      this.updateDate = value;
   }

   public java.sql.Timestamp getUpdateDate()
   {
      return this.updateDate;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("FuncId", getFuncId()).append("FuncPid", getFuncPid()).append("FuncName", getFuncName()).append("FuncUrl", getFuncUrl()).append("SortSeq", getSortSeq()).append("FuncDesc", getFuncDesc())
               .append("FuncStatus", getFuncStatus()).append("CreateDate", getCreateDate()).append("UpdateDate", getUpdateDate()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getFuncId()).append(getFuncPid()).append(getFuncName()).append(getFuncUrl()).append(getSortSeq()).append(getFuncDesc()).append(getFuncStatus()).append(getCreateDate()).append(getUpdateDate()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if (obj instanceof Menu == false) return false;
      if (this == obj) return true;
      Menu other = (Menu) obj;
      return new EqualsBuilder().append(getFuncId(), other.getFuncId()).append(getFuncPid(), other.getFuncPid()).append(getFuncName(), other.getFuncName()).append(getFuncUrl(), other.getFuncUrl()).append(getSortSeq(), other.getSortSeq())
               .append(getFuncDesc(), other.getFuncDesc()).append(getFuncStatus(), other.getFuncStatus()).append(getCreateDate(), other.getCreateDate()).append(getUpdateDate(), other.getUpdateDate()).isEquals();
   }
}
